Patent application WO 2004/016066 filed in the name of the Highdeal Company describes a computational formula editor able to: acquire a computational formula in the form of a tree structure, and record the computational formula acquired in an XML file (eXtensible Markup Language). The computational formulas in the form of a tree structure make it possible to define in a simple fashion very complex computational formulas. These computational formulas may be complex because they may include three large parameters, the values of which may be unknown at the moment of their definition.
A computational formula may be used to calculate the cost or a price of a service. In this case, the computational formula may be so designated using the term “tariff package”.
Typically, a tariff package includes subscription parameters. The values of these subscription parameters may be only known at the moment of the subscription, i.e., at the time where a consumer subscribes to the tariff package defined by a service provider. After subscribing to a tariff package, this consumer may be called a “client”. For example, the following parameters may be the subscription parameters, which may include: the age of the client, the place of residence of the client, the tariff options chosen, their telephone number, and so on.
A tariff package also frequently includes historical consumption parameters stored in the counters. The values of these counters may be known as the consumption of the priced service occurring by this offer. For example, a tariff package may include a sliding-scale tariff based on the history of consumption or even price reductions attributed based on the amounts previously consumed.
The editor that is described in patent application WO 2004/016066 is able to simply define these types of tariff packages.
Then, the XML file containing the tariff package, which may be edited, may be sent to an electronic valorization system. This valorization system contains this tariff package for each client, which may include:                the XML file containing the tariff package,        the value of the subscription parameters and, possibly, history of consumption, and        one or more balances in which the costs of or the services consumed may be collected.        
Each time a client uses the service, a consumption ticket may be sent to the valorization system. This consumption ticket may contain:                the consumption data that characterizes usage of the service, and        the client user name that consumed the service.        
The consumption data may include, for example, the volume or the quantity of service consumed as well as other information, such as the date and time the service was consumed.
In response to receiving the consumption ticket, the valorization system may scroll through the tariff package from the root node to the terminations in order to calculate the cost of the service consumed. In order to accomplish this, it may use, together with the consumption data, the value of the subscription parameters and the client's consumption history. The cost of the service thus calculated may then be added to the balance of the client.
The balance of the client may be a prepaid account. In this case, the accumulation of the service cost may reduce the initial amount of the balance of the calculated cost each time the service may be consumed until the credit may be exhausted on this prepaid account. Conversely, the balance may be a credit account. In this case, the costs may accumulate on the balance by adding the cost calculated to the previous calculated costs. The total amount indicated by the balance may then be invoiced from time to time before this balance may be reset.
The valorization system may calculate the costs for all the services consumed and for the group of clients. Thus, the work charge being given that represents for the valorization system, the charge of the calculation in real time of the cost of a service, may increase with the number of clients and services to be valued. Furthermore, the calculation of the cost of a service generally assumes that the valorization system receives consumption tickets. However, these consumption tickets may be transmitted by a point of sale or mobile terminal to the valorization system via a network. Thus, calculation of the cost of a service may be impossible in the absence of a network connection.
To remedy these problems, in the particular case of telephone calls, calculating the cost of telephone calls in mobile phones has already been proposed by launching a cost calculation application in a mobile phone see, for example, WO 02/08863. Implementing the tariff package in a smart card connected to the mobile phone has also already been suggested.
However, a tariff package such as that developed by the editor described in application WO 2004/016066 cannot be implemented in a smart card. In effect, this would be tantamount to launching the following in each client's smart card:                the aforementioned valorization system,        each tariff package to which the client has subscribed, and        the value of each subscription parameter and the history of consumption.        
However, the set of commands and the memory of a smart card may be much more limited than those of a PC computer or server. Thus, it proved that:                the set of commands necessary to implement the valorization system in the smart card was too limited,        the size of the executable code corresponding to the valorization system could not be reduced to a sufficiently small size to be able to be launched in a smart card, and        the number of tariff package parameters was frequently too high to be able to be implemented in a smart card.        